#include <stdio.h>
#include <math.h> 
int main(void){
	printf("plz enter upper bound:\n");
	int i,n,sum=0;
	scanf("%d",&n);
	for(i=1;i<=n;i++){
		sum = sum + pow(i,i);	
	}
	printf("SUM=%d",sum);
	return 0;
}
